<template>
	<view class="coupon xmb24 xflex-x-between">
		<view class="coupon-left xflex-y-center">
			<view class="coupon-left-money">
				<text class="coupon-left-money-text">￥</text>{{ info.price }}
			</view>
			<view class="coupon-left-moneyname">
				{{info.name}}
			</view>
		</view>
		<view class="coupon-right xflex-x-around">
			<view class="coupon-right-info">
				<view class="coupon-right-coupon">
					优惠券
				</view>
				<view class="coupon-right-time">
					<view class="">
						有效期：
					</view>
					<view class="">
						 {{info.startdate}}-{{info.enddate}}
					</view>
					
				</view>
			</view>
			
			<view class="">
				<slot name="couponBtn" :item="props.info"></slot>
			</view>
		</view>
	</view>
</template>
<script setup>
	import {
		ref,
		defineProps
	} from "vue"
	import {
		topage
	} from "../../utils/common";
	const props = defineProps({

		info: {
			type: Object,
			default: () => ({})
		}
	})
	const emit = defineEmits(['click'])
	
	// 
	const onclick = (e) => {
		emit('click', props.info)
	}
</script>

<style lang="scss" scoped>
.coupon {
	width: 100%;
	height: 166rpx;
	background-image: url("../../static/image/coupon.png");
	background-size: 100% 100%;
	&-left {
		width: 180rpx;
		height: 100%;
		&-money {
			font-size: 36rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #FFFFFF;
			&-text {
				font-size: 30rpx;
			}
		}
		&-moneyname {
			font-size: 24rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
		}
	}
	
	&-right {
		// width: 514rpx;
		flex: 1;
		&-info {
			flex: 1;
			margin-left: 30rpx;
		}
		&-coupon {
			font-size: 32rpx;
			font-family: PingFangSC-Semibold, PingFang SC;
			font-weight: 600;
			color: #333333;
		}
		&-time {
			margin-top: 12rpx;
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #909090;
		}
		&-btn {
			width: 148rpx;
			height: 52rpx;
			background: #56B700;
			border-radius: 41rpx;
			font-size: 26rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
			text-align: center;
			line-height: 52rpx;
		}
		&-btns {
			width: 148rpx;
			height: 52rpx;
			background: #909090;
			border-radius: 41rpx;
			font-size: 26rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
			text-align: center;
			line-height: 52rpx;
		}
	}
}
</style>
